<?php


$this->title = '详情';
?>

<?= yii\web\View::registerCssFile("/m/css/reset.css",['depends' => 'app\assets\MuiAsset']) ?>
<?= yii\web\View::registerCssFile("/m/css/xiangqing.css",['depends' => 'app\assets\MuiAsset']) ?>

<style type="text/css">
	.text-center{text-align: center;}
	.c-list{color: #000;font-weight: 300;}
	.left-top span{margin-right:10px;display: inline-block;}
	.right{line-height: 50px;}
	.s1{width: 20px;}
	.s2{width: 50px;}
</style>

<div class="header">
	<a href="/sign/sign/detail?sort=group&group_tag=<?=$group_tag?>" class="mui-btn <?=($sort=='group')?'act':''?>">按团号排序</a>
</div>
<input type="hidden" name="_csrf" id="_csrf" value="<?=\Yii::$app->getRequest()->getCsrfToken()?>">
<div class="list">
	<ul>
		<?php foreach($model as $key=>$val){ ?>
		<li class="c-list mui-row">
			<div class="left mui-col-sm-9 mui-col-xs-9">
				<div class="left-top">
					<div style="width: 50%;display: inline-block;">
					<span class="biaoshi"><?=$val->group?></span>
					</div>
				</div>
				<div class="left-bottom">
					<div style="width: 50%;display: inline-block;">
					<span class="s2"><?=$val->first_name.$val->last_name?></span>
					</div>
				</div>
				<div class="left-bottom">
					<div style="width: 50%;display: inline-block;">
					<span><?=$val->phone?></span>
					</div>
					<span><?=$val->passport?></span>
				</div>
				<div class="left-bottom">
					<div style="width: 50%;display: inline-block;">
					<span>衣服号码：<?=$val->size?></span>
					</div>
					<span>衣服颜色：<?=$val->color?></span>
				</div>
				<div class="left-bottom">
					<div style="width: 50%;display: inline-block;">
					<span>房间号：<?=$val->roomUse->code?></span>
					</div>
					<span>培训票：<?=$val->ticket?></span>
				</div>
			</div>
			<div class="right mui-col-sm-23 mui-col-xs-3">
				<?php if($val->sign == 0){ ?>
				<span class="weiqian">未签到</span><br />
				<?php }else if($val->sign == 1){ ?>
				<span class="yiqian">已签到</span><br />	
				<?php }?>
				<span class="yiqian"><?=\yii::$app->params['cancel'][$val->cancel]?></span><br />
			</div>
		</li>
		<?php }?>
	</ul>
	<div class="mui-content-padded text-center">
    <?= yii\widgets\LinkPager::widget(['pagination' => $pages,'lastPageLabel'=>false, 'firstPageLabel'=>false,'maxButtonCount'=>5,'activePageCssClass'=>'mui-active','disabledPageCssClass'=>'mui-disabled','nextPageLabel' => false,'prevPageLabel' => false,'options'=>['class'=>'mui-pagination']]); ?>
   </div>	
</div>


<?php app\components\JsBlock::begin() ?>
<script type="text/javascript">
var phone = $.trim(localStorage.getItem("phone"));
var _csrf = $("#_csrf").val();
if(phone.length != 0){
	$.ajax({
	   type: "post",
	   async:false, 
	   url: "/sign/member/auto-login",
	   data: {'phone':phone,'_csrf':_csrf},
	   success: function(res){
	   	    var res = $.parseJSON(res);
	        if(res.code == 0){
	        	return false;
	        }else if(res.code == 1){
	        	window.location.reload(); 
	        }
	   }
	});
}
</script>
<?php app\components\JsBlock::end() ?> 	